home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 4 / Windows 6-Pak (InfoMagic) (Disc 4) (1999).ISO / Text-Chat-Scripts / pp-320m.exe / pp300 / r-hidden.mrc < prev    next >
Encoding:
Text File  |  1998-08-29  |  15.7 KB  |  395 lines

  1. ; -----------------------------------------------------
  2. ; Peace and Protection (by misspai)
  3. ; -----------------------------------------------------
  4. ; Things behind the scenes
  5. ; -----------------------------------------------------
  6. ; Evaluating and tracking your
  7. ; addresses and nicknames
  8. ; -----------------------------------------------------
  9. alias _trackcode {
  10.   set %-track.code $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(0,9) $+ $r(0,9) $+ $r(0,9) $+ $r(0,9)
  11.   _qcr $me %-track.code
  12.   .rlevel -r 200
  13. }
  14. on 1:ctcpreply:%-track.code:{
  15.   set %-my.address $address
  16.   if ($ip isin $address) disps Your address- %col.addr $+ $address $+  %col.att $+ (numeric IP)
  17.   elseif (. isin $ip) disps Your address- %col.addr $+ $address $+  (IP- $ip $+ )
  18. }
  19. ; -----------------------------------------------------
  20. ; Tracks users who change nicks
  21. ; while you are trying to track them
  22. ; -----------------------------------------------------
  23. alias -l _nicktrac {
  24.   if ($nick == %-keybop.nick) set %-keybop.nick $newnick
  25.   if ($nick == %_last.ping) set %_last.ping $newnick
  26.   if ($nick == %_last.whois) set %_last.whois $newnick
  27.   if (%-fping. [ $+ [ $nick ] ] != $null) { set %-fping. [ $+ [ $newnick ] ] %-fping. [ $+ [ $nick ] ] | set %-fping. [ $+ [ $nick ] ] }
  28.   if ($gettok(%-last.uctcp,1,32) == $nick) set %-last.uctcp $newnick $gettok(%-last.uctcp,2-,32)
  29.   if ($findtok(%-last.clones,$nick,44) != $null) set %-last.clones $reptok(%-last.clones,$nick,$newnick,44)
  30.   if (%+nickcolors) {
  31.     if (%-nickcol. [ $+ [ $nick ] ] == %col.nicki) _nickcol $newnick $address $newnick $+ ! $+ $address *
  32.     else _nickcol $newnick $address $newnick $+ ! $+ $address
  33.     set %-nickcol. [ $+ [ $nick ] ]
  34.   }
  35.   if ($me == $nick) {
  36.     if (%_away.why) .timer -m 1 1 _ncmyaway
  37.     elseif (%-+backonnick) .timer -m 1 1 _ncmyback
  38.     if (%+notify.hideme) {
  39.       set %-+hide.unnotify. [ $+ [ $nick ] ] $true
  40.       .timer 1 3 unset % $+ -+hide.unnotify. $+ $nick
  41.     }
  42.     if ((%s^c == ChanServ) && ($_not(%+nickserv.onlyifwarn))) .timer -m 1 1 auto npq
  43.   }
  44.   set %.var -lastt. $+ $fulladdress $+ *
  45.   [ unset % $+ [ %.var ] ]
  46. }
  47. on 1:notice:*nick is owned by someone else*Please choose another*:?:if (($nick == NickServ) && (%s^c == ChanServ) && ((%+nickserv.onlyifwarn) || (%-recent.ns.login != $true))) auto npq
  48. on 1:notice:AUTHENTICATION SUCCESSFUL ON *:?:if (($address == cservice@undernet.org) && (%pp.net == undernet) && (($nick == X) || ($nick == W))) set %-authxw. [ $+ [ $_lchop(1,$4) ] ] $nick
  49. on 1:notice:Passwords are now mandatory. Please use the 'newpass' command now.:?:if (($address == cservice@undernet.org) && (%pp.net == undernet) && (($nick == X) || ($nick == W))) { set %.num $comchan($nick,0) | :loop | set %-authxw. [ $+ [ $comchan($nick,%.num) ] ] $nick | if ($_vd(.num) > 0) goto loop }
  50. alias _ncmyaway {
  51.   if (%+pager) set %.qa.raw $_getmsg(away,pageron)
  52.   else set %.qa.raw $_getmsg(away,pageroff)
  53.   .raw away : $+ $_finalmsg($replace($replace($replace($replace(%.qa.raw,&reason&,%_away.why),&when&,%_away.ts),&pager&,$lower($_tf2o(%+pager))),&logging&,$lower($_tf2o(%+awaylog.on))))
  54.   if (%-+awayonnick) {
  55.     unset %-+awayonnick
  56.     aame $_finalmsg($replace($replace($replace($replace($_getmsg(away,away),&reason&,%_away.why),&when&,%_away.ts),&pager&,$lower($_tf2o(%+pager))),&logging&,$lower($_tf2o(%+awaylog.on))))
  57.   }
  58.   if ($_not(%_+away.quiet)) if (%away.repeat > 60) .timer932 0 %away.repeat ame $_finalmsg($replace($replace($replace($replace($_getmsg(away,stillaway),&reason&,%_away.why),&when&,%_away.ts),&pager&,$lower($_tf2o(%+pager))),&logging&,$lower($_tf2o(%+awaylog.on))))
  59. }
  60. alias _ncmyback {
  61.   aame $_finalmsg($replace($replace($replace($replace($_getmsg(away,back),&reason&,%-bon.why),&when&,$remove($remove($timestamp,[),])),&pager&,$lower($_tf2o(%+pager.here))),&awaytime&,%-bon.gone))
  62.   unset %-+backonnick %-bon.*
  63. }
  64. ; -----------------------------------------------------
  65. ; Channel key memory
  66. ; -----------------------------------------------------
  67. raw 324:*:if ($2 ischan) _chkkey $2 | halt
  68. on 1:mode:#:if (k isin $1-) { _chkkey $chan | .timer923 1 1 _chkkey $chan }
  69. alias _chkkey if ($chan($1).key != $null) _writecfg Keys $1 $chan($1).key
  70. ; -----------------------------------------------------
  71. ; Userlist stamping
  72. ; -----------------------------------------------------
  73. ctcp 1:dcc:{
  74.   if ($level($fulladdress) > 1) {
  75.     writeini $_ppdir $+ userlist.ini seen $maddress($fulladdress) $ctime Saw
  76.     if ($null == $readini $_ppdir $+ userlist.ini nick $maddress($fulladdress)) writeini $_ppdir $+ userlist.ini nick $maddress($fulladdress) $nick
  77.   }
  78. }
  79. on 1:open:?:{
  80.   if ($level($fulladdress) > 1) {
  81.     writeini $_ppdir $+ userlist.ini seen $maddress($fulladdress) $ctime Saw
  82.     if ($null == $readini $_ppdir $+ userlist.ini nick $maddress($fulladdress)) writeini $_ppdir $+ userlist.ini nick $maddress($fulladdress) $nick
  83.   }
  84. }
  85. ; -----------------------------------------------------
  86. ; Detection and redisplay of text in
  87. ; the background color
  88. ; -----------------------------------------------------
  89. #whitetxt off
  90. on 1:text:*?*:*:_dowt t $1-
  91. on 1:action:*?*:*:_dowt a $1-
  92. on 1:chat:*?*:_dowt c $1-
  93. alias -l _dowt {
  94.   ; %.b = your background color
  95.   set %.b $calc($colour(back) % 16)
  96.   set %.txt ! $_s2p($2-)
  97.   set %.max $_i($count(%.txt,))
  98.   set %.tok 2
  99.   set %.bk %.b
  100.   set %.fg ?
  101.   :loop
  102.   set %.ccol $gettok(%.txt,%.tok,3)
  103.   if ($left(%.ccol,2) isnum) { set %.fg $calc($left(%.ccol,2) % 16) | set %.ccol $_rchop(2,%.ccol) }
  104.   elseif ($left(%.ccol,1) isnum) { set %.fg $left(%.ccol,1) | set %.ccol $_rchop(1,%.ccol) }
  105.   else goto inval
  106.   if ($left(%.ccol,1) == ,) {
  107.     if ($mid(%.ccol,2,2) isnum) set %.bk $calc($mid(%.ccol,2,2) % 16)
  108.     elseif ($mid(%.ccol,2,1) isnum) set %.bk $mid(%.ccol,2,1)
  109.   }
  110.   if ((%.bk == %.b) && (%.fg == %.b)) goto white
  111.   :inval
  112.   if ($_vi(.tok) <= %.max) goto loop
  113.   return
  114.   :white
  115.   if ($1 == c) echo $colour(ctcp) -i2 =$nick ½ $+ $nick $+ -invis╗ $_stripc($2-)
  116.   elseif ($chan != $null) echo $colour(ctcp) -i2 $chan ½ $+ $nick $+ -invis╗ $_stripc($2-)
  117.   else echo $colour(ctcp) -i2 $nick ½ $+ $nick $+ -invis╗ $_stripc($2-)
  118. }
  119. #whitetxt end
  120. ; -----------------------------------------------------
  121. ; Keeping voiced users sync'ed
  122. ; -----------------------------------------------------
  123. #voiceautosync off
  124. on 1:voice:#:set %.var -isvoc. $+ $nick $+ . $+ $chan | set % [ $+ [ %.var ] ] $true
  125. on 1:devoice:#:set %.var -isvoc. $+ $nick $+ . $+ $chan | set % [ $+ [ %.var ] ]
  126. on 1:nick:{
  127.   set %.nk.ch $comchan($newnick,0)
  128.   :loop
  129.   set %.nk.var -isvoc. $+ $nick $+ . $+ $comchan($newnick,%.nk.ch)
  130.   if (% [ $+ [ %.nk.var ] ] ) {
  131.     set % [ $+ [ %.nk.var ] ]
  132.     set %.nk.var -isvoc. $+ $newnick $+ . $+ $comchan($newnick,%.nk.ch)
  133.     set % [ $+ [ %.nk.var ] ] $true
  134.   }
  135.   if ($_vd(.nk.ch) > 0) goto loop
  136.   _nicktrac
  137. }
  138. on 1:deop:#:{
  139.   set %.var -isvoc. $+ $nick $+ . $+ $chan
  140.   if ((% [ $+ [ %.var ] ] ) && ($findtok(%-vsync.2update,$chan,44) == $null)) {
  141.     set %-vsync.2update %-vsync.update $chan
  142.     set %-vsync.2update $_s2c(%-vsync.2update)
  143.     .timer928 1 3 _vresync
  144.   }
  145. }
  146. on 1:part:#:set %.var -isvoc. $+ $nick $+ . $+ $chan | set % [ $+ [ %.var ] ]
  147. #voiceautosync end
  148. on 1:nick:_nicktrac
  149. ; -----------------------------------------------------
  150. ; ARP window
  151. ; -----------------------------------------------------
  152. alias arp {
  153.   if (3.1 isin $os) _error This feature (ARP) only works on Windows 95.
  154.   window -c @IPs
  155.   dispa Detecting connected IPs...
  156.   run -n $_ppdir $+ do-arp.bat $ddename $_ppdir /_arpdone -a
  157. }
  158. alias _arpdone {
  159.   window -l $+ $_spec1d $_tabscale(29,38) @IPs $_winpos(9%,9%,3%,3%) @IPs %font.basic
  160.   titlebar @IPs connected
  161.   aline @IPs  Named Host      Numeric IP      Notes 
  162.   set %.file $_ppdir $+ arp-temp.txt
  163.   set %.line 3
  164.   :loop1
  165.   set %.data $read -nl [ $+ [ %.line ] ] %.file
  166.   if (%.data != $null) {
  167.     if (. isin %.data) aline @IPs %col.misc $+ ???     $+ $gettok(%.data,1,32) $+      $+ %col.misc $+ (none)
  168.     inc %.line
  169.     goto loop1
  170.   }
  171.   aline -s @IPs $chr(160)
  172.   sline -r @IPs $sline(@IPs,1).ln
  173.   if (%.line == 3) { aline %col.base @IPs No connected IPs detected. | aline @IPs (Note- this feature may not work properly on Windows NT.) | halt }
  174.   aline %col.base @IPs Please wait, resolving IPs...
  175.   .enable #_arpdns
  176.   set %_arp.line $calc($line(@IPs,0) - 3)
  177.   set %_arp.curr 2
  178.   set %_arp.first $gettok($line(@IPs,2),2,9))
  179.   set %.line 2
  180.   unset %_qdns.*
  181.   :loop2
  182.   _qdns $gettok($line(@IPs,%.line),2,9)
  183.   if (%.line <= %_arp.line) { inc %.line | goto loop2 }
  184.   if ($server != $null) { set %_arp.server $server | _qdns $server }
  185.   else unset %_arp.server
  186.   if ($url == $null) unset %_arp.url
  187.   else {
  188.     if (// isin $url) set %_arp.url $gettok($url,2,47)
  189.     else set %_arp.url $gettok($url,1,47)
  190.     set %_arp.url $gettok($gettok(%_arp.url,1,58),1,64)
  191.     if (%_arp.url != $null) _qdns %_arp.url
  192.   }
  193. }
  194. alias -l _qdns {
  195.   if (%_qdns.num == $null) { set %_qdns.num 1 | .dns $1 }
  196.   else { set %_qdns. [ $+ [ %_qdns.num ] ] $1 | inc %_qdns.num }
  197. }
  198. #_arpdns off
  199. on 1:dns:{
  200.   if (%_arp.first != $null) { if ($iaddress != %_arp.first) return | unset %_arp.first }
  201.   if (%_arp.curr != $null) {
  202.     if ($raddress == $null) rline @IPs %_arp.curr %col.misc $+ (failedátoáresolve)     $+ $gettok($line(@IPs,%_arp.curr),2-,9)
  203.     else rline @IPs %_arp.curr $raddress $+      $+ $gettok($line(@IPs,%_arp.curr),2-,9)
  204.     if (%_arp.curr <= %_arp.line) inc %_arp.curr
  205.     else {
  206.       unset %_arp.curr
  207.       if (%_arp.server != $null) rline %col.base @IPs $line(@IPs,0) Please wait, resolving IRC server...
  208.       elseif (%_arp.url != $null) rline %col.base @IPs $line(@IPs,0) Please wait, resolving current URL...
  209.       else _arptidy
  210.     }
  211.   }
  212.   elseif (%_arp.server != $null) {
  213.     set %_arp.servi $iaddress | set %_arp.servn $naddress | unset %_arp.server
  214.     if (%_arp.url != $null) rline %col.base @IPs $line(@IPs,0) Please wait, resolving current URL...
  215.     else _arptidy
  216.   }
  217.   else {
  218.     set %_arp.urli $iaddress | set %_arp.urln $naddress | unset %_arp.url
  219.     _arptidy
  220.   }
  221.   .timer -m 1 1 _doughnut
  222. }
  223. alias _doughnut {
  224.   inc %_qdns.cur
  225.   if (%_qdns. [ $+ [ %_qdns.cur ] ] != $null) { set %_qdns.cur %_qdns.cur | .dns %_qdns. [ $+ [ %_qdns.cur ] ] }
  226. }
  227. #_arpdns end
  228. alias -l _arptidy {
  229.   .disable #_arpdns
  230.   rline %col.base @IPs $line(@IPs,0) Please wait, collecting info...
  231.   set %.line 2
  232.   :loop1
  233.   set %.named $gettok($line(@IPs,%.line),1,9)
  234.   set %.ip $gettok($line(@IPs,%.line),2,9)
  235.   unset %.notes
  236.   unset %.color
  237.   if ((%.ip == 127.0.0.1) || (%.ip == $ip)) set %.notes You ( $+ $me $+ )
  238.   elseif ((%.ip == %_arp.urli) || (%.named == %_arp.urln)) set %.notes Current URL (WWW)
  239.   elseif ((%.ip == %_arp.servi) || (%.named == %_arp.servn)) set %.notes IRC server
  240.   elseif ((%.ip == %email.pop3) || (%.named == %email.pop3)) set %.notes POP3 (e-mail get)
  241.   elseif ((%.ip == %email.smtp) || (%.named == %email.smpt)) set %.notes SMTP (e-mail send)
  242.   else {
  243.     set %.num $chat(0)
  244.     if (%.num > 0) {
  245.       :loop2
  246.       if ($chat(%.num).ip == %.ip) set %.notes %.notes Chatáw/ $+ $chat(%.num)
  247.       if ($_vd(.num) > 0) goto loop2
  248.     }
  249.     set %.num $send(0)
  250.     if (%.num > 0) {
  251.       :loop3
  252.       if ($send(%.num).ip == %.ip) set %.notes %.notes Sendátoá  $+ $send(%.num)
  253.       if ($_vd(.num) > 0) goto loop3
  254.     }
  255.     set %.num $get(0)
  256.     if (%.num > 0) {
  257.       :loop4
  258.       if ($get(%.num).ip == %.ip) set %.notes %.notes Getáfromá  $+ $get(%.num)
  259.       if ($_vd(.num) > 0) goto loop4
  260.     }
  261.     set %.num $fserv(0)
  262.     if (%.num > 0) {
  263.       :loop5
  264.       if ($fserv(%.num).ip == %.ip) set %.notes %.notes FServeátoá  $+ $fserv(%.num)
  265.       if ($_vd(.num) > 0) goto loop5
  266.     }
  267.     if (%.notes == $null) set %.verb $true
  268.     else set %.verb $false
  269.     set %.wildi *!*@ $+ %.ip | set %.wildn *!*@ $+ %.named
  270.     set %.num $ial(%.wildi,0)
  271.     if (%.num > 0) {
  272.       if (%.notes == $null) set %.color $strip($remove(%col.att,))
  273.       :loop6
  274.       if (%.verb) set %.notes %.notes ???áfromá  $+  $+ $replace($ial(%.wildi,%.num),!,!)
  275.       else set %.notes %.notes ( $+ $ial(%.wildi,%.num) $+ )
  276.       if ($_vd(.num) > 0) goto loop6
  277.     }
  278.     set %.num $ial(%.wildn,0)
  279.     if (%.num > 0) {
  280.       if (%.notes == $null) set %.color $strip($remove(%col.att,))
  281.       :loop7
  282.       if (%.verb) set %.notes %.notes ???áfromá $+  $+ $replace($ial(%.wildn,%.num),!,!)
  283.       else set %.notes %.notes ( $+ $ial(%.wildn,%.num) $+ )
  284.       if ($_vd(.num) > 0) goto loop7
  285.     }
  286.     if (%.notes != $null) set %.notes $_s2cs(%.notes)
  287.     else {
  288.       set %.1st $gettok(%.named,1,46)
  289.       if ($findtok(mail.smtp.pop3,%.1st,46) != $null) set %.notes (Probably mail)
  290.       elseif ($findtok(http.www.home,%.1st,46) != $null) set %.notes (Probably WWW)
  291.       elseif ($findtok(nntp.news,%.1st,46) != $null) set %.notes (Probably news)
  292.       elseif (%.1st == ftp) set %.notes (Probably FTP)
  293.       elseif ((ds* iswm %.1st) || (ns* iswm %.1st) || (dn* iswm %.1st)) set %.notes (Possibly DNS)
  294.       elseif ((208.202.84.* iswm %.ip) || (38.161.232.* iswm %.ip) || (icq* iswm %.1st)) set %.notes (Probably ICQ)
  295.       else { set %.notes Unknown source | set %.color $strip($remove(%col.att,)) }
  296.     }
  297.   }
  298.   rline %.color @IPs %.line %.named $+      $+ %.ip $+      $+ %.notes
  299.   if (%.line <= %_arp.line) { inc %.line | goto loop1 }
  300.   rline %col.base @IPs $line(@IPs,0) Scan complete!
  301.   window -b @IPs
  302.   unset %_arp.* %_qdns.*
  303.   halt
  304. }
  305. menu @IPs {
  306.   Get new IP list:arp
  307.   Rescan these IPs:window -c @IPs | _arpdone
  308.   -
  309.   /who selected addresses:set %.ln $sline(@IPs,0) | if (%.ln < 1) halt | :loop | _whoarp $sline(@IPs,%.ln).ln | if ($_vd(.ln) > 0) goto loop
  310.   -
  311.   Copy named host:clipboard $strip($gettok($sline(@IPs,1),1,9))
  312.   Copy numeric IP:clipboard $gettok($sline(@IPs,1),2,9)
  313.   Copy full line:clipboard $strip($replace($_f2s($sline(@IPs,1)),$chr(9),$chr(32)))
  314.   -
  315.   Save to file...:_askr _savearp Filename to save to?
  316.   Close:window -c @IPs
  317. }
  318. alias _savearp {
  319.   set %.file $_adddir($1-)
  320.   write -c %.file Connected IPs, logged on $fulldate for $me ( $+ $ip $+ ) by Peace and Protection %pp.ver
  321.   write %.file -
  322.   set %.ln $line(@IPs,0) | set %.cr 1
  323.   :loop
  324.   write %.file $strip($line(@IPs,%.cr))
  325.   if ($_vi(.cr) <= %.ln) goto loop
  326.   _recfile2 %.file
  327.   disps Connected IPs logged to %col.target $+ %.file $+  on $fulldate
  328. }
  329. alias _whoarp {
  330.   if (($1 < 2) || ($1 >= $_j($line(@IPs,0)))) return
  331.   set %.who1 $gettok($line(@IPs,$1),1,9)
  332.   set %.who2 $gettok($line(@IPs,$1),2,9)
  333.   if ($chr(40) !isin %.who1) .raw who %.who1
  334.   .raw who %.who2
  335. }
  336. ; -----------------------------------------------------
  337. ; Windows that only close- First
  338. ; gives a popup, second simply
  339. ; closes immediately on right click.
  340. ; Both close on double click.
  341. ; -----------------------------------------------------
  342. menu @Close {
  343.   dclick /window -c $active
  344.   Close window:window -c $active
  345. }
  346. menu @Close2 {
  347.   dclick /window -c $active
  348.   $_exec(window -c [ $active ] ):{ }
  349. }
  350. menu @About {
  351.   dclick /_abcde
  352.   $_exec(_abcde):{ }
  353. }
  354. alias _abcde window -c @@ | window -c @á | window -c @áá | window -c @ááá | .play stop
  355. menu @Addons {
  356.   dclick /_doaddon
  357.   Close window:window -c $active
  358. }
  359. menu @Addon {
  360.   dclick /_doaddon2 
  361.   Close window:window -c $active
  362. }
  363. menu @Patches {
  364.   dclick /_dopatch
  365.   Close window:window -c $active
  366. }
  367. menu @Colors1 {
  368.   dclick /_cwinsel
  369.   Close window:window -c $active
  370. }
  371. menu @Colors2 {
  372.   dclick /_cwinsel2
  373.   Close window:window -c $active
  374. }
  375. menu @ColorSelect {
  376.   dclick /_clredit2
  377.   Close window:window -c $active
  378. }
  379. menu @ColorSelect2 {
  380.   dclick /_schquick
  381.   Close window:window -c $active
  382. }
  383. menu @Revolve {
  384.   dclick /_rsetclk
  385.   Close window:window -c $active
  386. }
  387. menu @Actions {
  388.   dclick /_asetclk
  389.   Close window:window -c $active
  390. }
  391. menu @SchemeDelete {
  392.   dclick /_schdel
  393.   Close window:window -c $active
  394. }
  395.